JAVAC = javac
JAVA = java
JINCLUDEPATH = -cp '.:Channel.jar'
JFLAGS = $(JINCLUDEPATH)
MV = mv
MD = mkdir -p
DEL = rm -f
BUILD_DIR = bin
SRC_DIR = src

first: all
all: java_compile move_files
build_dir:
	$(MD) $(BUILD_DIR)

java_compile: build_dir src/Server.class src/Requester.class src/Volunteer.class

move_files: java_compile
	$(MV) $(SRC_DIR)/*.class $(BUILD_DIR)

clean:
	$(DEL) $(BUILD_DIR)/*.class


%.class: %.java
	$(JAVAC) $(JFLAGS) $<

